package modle

import (
	"time"

	"github.com/shopspring/decimal"
)

// BaseModeTitle 基础模型
type BaseModeTitle struct {
	Id int64 `gorm:"column:id;primary_key"`
}

// BaseModeTail 基础模型
type BaseModeTail struct {
	CreateTime time.Time `gorm:"column:create_time;default:now();comment:'创建时间'"`
	CreateUser string    `gorm:"column:create_user;type:varchar(50);comment:'创建者'"`
	UpdateTime time.Time `gorm:"column:update_time;default:now();comment:'更新时间'"`
	UpdateUser string    `gorm:"column:update_user;type:varchar(50);comment:'更新者'"`
	TS         time.Time `gorm:"column:ts;type:timestamp;default:now();comment:'时间戳'"`
	YN         int8      `gorm:"column:yn;default:1;comment:'1标识有效，0标识无效'"`
}

// Dic 字典表
type Dic struct {
	BaseModeTitle
	Category    int    `gorm:"column:category;default:0;comment:'类型'"`
	Key         string `gorm:"column:key;default:'';index:idx_key"`
	Value1      string `gorm:"column:value_1;type:varchar(256);default:''"`
	Value2      string `gorm:"column:value_2;type:varchar(256);default:''"`
	Value3      string `gorm:"column:value_3;type:varchar(256);default:''"`
	Value4      string `gorm:"column:value_4;type:varchar(256);default:''"`
	Description string `gorm:"column:description;type:varchar(256);default:''"`
	IsDelete    bool   `gorm:"column:is_delete;default:0;comment:'0=正常 1=删除'"`
	Erp         string `gorm:"column:erp;type:varchar(128);default:'';comment:'erp账号'"`
	BaseModeTail
}

// Banner 轮播图表
type Banner struct {
	BaseModeTitle
	Position     int       `gorm:"column:position;default:1;comment:'显示位置 1=首页引导页 2=轮播图'"`
	Title        string    `gorm:"column:title;type:varchar(256);default:'';comment:'标题'"`
	Content      string    `gorm:"column:content;type:varchar(4096);default:'';comment:'内容'"`
	JumpType     int       `gorm:"column:jump_type;default:1;comment:'跳转类型,1=h5 2=app内页面跳转'"`
	TitleImgUrl  string    `gorm:"column:title_img_url;default:'';type:varchar(256);comment:'标题图片地址'"`
	ImgUrl       string    `gorm:"column:img_url;default:'';type:varchar(256);comment:'图片地址'"`
	JumpTarget   string    `gorm:"column:jump_target;default:'';type:varchar(256);comment:'跳转目标'"`
	Status       int       `gorm:"column:status;default:0;comment:'0=新创建 1=已发布 2=已下架 3= 已删除'"`
	ContractType int       `gorm:"column:contract_type;default:0;comment:'合同类型 1=高峰期实习生 2=非全日制全同工 3=实训室 4= 合同工'"`
	MemberGrade  string    `gorm:"column:member_grade;default:'';comment:'客服等级 多个等级间用逗号分隔'"`
	MemberStar   string    `gorm:"column:member_star;default:'';comment:'星级 多个星级用逗号分隔'"`
	PublishTime  time.Time `gorm:"column:publish_time;comment:'发布时间'"`
	BaseModeTail
}

// MessageTemplate 消息模板
type MessageTemplate struct {
	BaseModeTitle
	Title         string `gorm:"column:title;type:varchar(256);default:'';comment:'标题'"`
	Content       string `gorm:"column:content;type:varchar(2048);default:'';comment:'内容'"`
	ImgUrl        string `gorm:"column:img_url;type:varchar(256);default:'';"`
	MessageType   int    `gorm:"column:message_type;default:1;comment:'1=短信 2=push 3=站内信'"`
	NoticeType    int    `gorm:"column:notice_type;default:1;comment:'1=任务中心 2=主管 3=薪酬助手'"`
	TriggerAction int    `gorm:"column:trigger_action;default:0;comment:'触发动作'"`
	TriggerTime   string `gorm:"column:trigger_time;type:varchar(256);default:'';comment:'触发时间，由各模块自己处理此字段'"`
	PriorityLevel int    `gorm:"column:priority_level;default:0;comment:'优先级'"`
	BaseModeTail
}

// MemberMessage 成员收到的消息表
type MemberMessage struct {
	BaseModeTitle
	TemplateId int64  `gorm:"column:template_id;default:0;comment:'模板id'"`
	Erp        string `gorm:"column:erp;type:varchar(128);default:'';comment:'erp账号'"`
	Title      string `gorm:"column:title;type:varchar(256);default:'';comment:'标题'"`
	Content    string `gorm:"column:content;type:varchar(2048);default:'';comment:'内容'"`
	IsPush     bool   `gorm:"column:is_push;default:false;comment:'是否是推送消息'"`
	IsSMS      bool   `gorm:"column:is_sms;default:false;comment:'是否是短信'"`
	IsMsg      bool   `gorm:"column:is_msg;default:false;comment:'是否是站内信'"`
	IsRead     int    `gorm:"column:is_read;default:0;comment:'是否已读 0=未读 1=已读'"`
	BaseModeTail
}

// SysMember 系统用户表 京东导入的数据
type SysMember struct {
	BaseModeTitle
	Name          string    `gorm:"column:name;type:varchar(256);default:'';comment:'姓名'"`
	Mobile        string    `gorm:"column:mobile;type:varchar(256);default:'';comment:'手机号'"`
	Erp           string    `gorm:"column:erp;type:varchar(256);default:'';index:idx_erp;comment:'erp账号'"`
	Status        int       `gorm:"column:status;default:0;comment:'实习期，养残，预离职，正常在岗，试用期'"`
	ParentErp     string    `gorm:"column:parent_erp;type:varchar(256);default:'';comment:'汇报人ERP'"`
	ContractType  string    `gorm:"column:contract_type;type:varchar(16);default:'';comment:'合同类型 A 合同工 F 实训室 G高峰期实习生 I非全日制合同工'"`
	EntryTime     time.Time `gorm:"column:entry_time;comment:'入职时间'"`
	DepartureTime time.Time `gorm:"column:departure_time;comment:'离职时间'"`
	BizUnit       string    `gorm:"column:biz_unit;type:varchar(256);default:'';comment:'业务单元'"`
	IsTL          bool      `gorm:"column:is_tl;default:false;comment:'是否team leader'"`
	IdCard        string    `gorm:"column:id_card;type:varchar(64);default:'';comment:'身份证'"`
	IdCardExTime  string    `gorm:"column:id_card_ex_time;type:varchar(32);default:'';comment:'身份证过期时间'"`
	IsBlack       bool      `gorm:"column:is_black;default:false;comment:'是否黑名单'"`
	IsLock        bool      `gorm:"column:is_lock;default:false;comment:'是否锁定'"`
	IsDel         bool      `gorm:"column:is_del;default:false;comment:'是否已删除'"`
	BaseModeTail
}

// SysPermission 系统资源表
type SysPermission struct {
	BaseModeTitle
	Name        string `gorm:"column:name;type:varchar(256);default:'';comment:'名称'"`
	Description string `gorm:"column:description;type:varchar(256);default:''"`
	Url         string `gorm:"column:url;type:varchar(256);default:''"`
	ParentId    string `gorm:"column:parent_id;type:varchar(256);default:'';comment:''"`
	BaseModeTail
}

// SysPermissionRole 角色资源表
type SysPermissionRole struct {
	BaseModeTitle
	RoleId       int64 `gorm:"column:role_id;default:0;comment:''"`
	PermissionId int64 `gorm:"column:permission_id;default:0;comment:''"`
	BaseModeTail
}

// SysRole 角色表
type SysRole struct {
	BaseModeTitle
	Name     string `gorm:"column:name;type:varchar(256);default:'';comment:'名称'"`
	RoleDesc string `gorm:"column:role_desc;type:varchar(256);default:''"`
	BaseModeTail
}

// SysRoleMember 角色表
type SysRoleMember struct {
	BaseModeTitle
	Erp       string `gorm:"column:erp;default:'';comment:''"`
	SysRoleId int64  `gorm:"column:sys_role_id;default:0;comment:''"`
	BaseModeTail
}

//Member 用户表
type Member struct {
	BaseModeTitle
	Name    string `gorm:"column:name;type:varchar(256);default:'';comment:'姓Member名'"`
	Mobile  string `gorm:"column:mobile;type:varchar(256);default:'';index:idx_mobile;comment:'手机号'"`
	Erp     string `gorm:"column:erp;type:varchar(256);default:'';unique_index:uniq_erp;comment:'erp账号'"`
	Grade   int    `gorm:"column:grade;default:0;comment:'等级'"`
	Star    int    `gorm:"column:star;default:0;comment:'星级'"`
	HeadIco string `gorm:"column:head_ico;type:varchar(256);default:'';comment:'头像路径'"`
	BaseModeTail
}

// Honor 荣誉表
type Honor struct {
	BaseModeTitle
	Erp         string `gorm:"column:erp;type:varchar(128);default:'';comment:'erp账号'"`
	Name        string `gorm:"column:name;type:varchar(256);default:''"`
	Description string `gorm:"column:description;type:varchar(256);default:'';comment:'荣誉名称'"`
	ImgUrl      string `gorm:"column:img_url;default:'';comment:'app显示时的url'"`
	BaseModeTail
}

// MemberAuth 员工认证表
type MemberAuth struct {
	BaseModeTitle
	Erp                  string          `gorm:"column:erp;type:varchar(128);unique_index:uniq_erp;default:'';comment:'erp账号'"`
	CourseId             string          `gorm:"column:course_id;default:'';type:varchar(64);comment:'课程id'"`
	CourseResult         int             `gorm:"column:course_result;default:0;comment:'课程培训结果'"`
	OnlineTime           int             `gorm:"column:online_time;default:0;comment:'在线时长'"`
	RecCount             int             `gorm:"column:rec_count;default:0;comment:'接线量'"`
	PersonalSatisfaction decimal.Decimal `gorm:"column:personal_satisfaction;type:decimal(36,18);default:0;comment:'个人满意度'"`
	SolveRatio           decimal.Decimal `gorm:"column:solve_ratio;type:decimal(36,18);default:0;comment:'首解率'"`
	Quality              decimal.Decimal `gorm:"column:quality;type:decimal(36,18);default:0;comment:'质检'"`
	BeforeGrade          int             `gorm:"column:before_grade;default:0;comment:'认证前等级'"`
	AfterGrade           int             `gorm:"column:after_grade;default:0;comment:'认证后等级'"`
	AuthTime             time.Time       `gorm:"column:auth_time;comment:'认证时间'"`
	UpgradeResult        int             `gorm:"column:upgrade_result;default:0;comment:'升级结果 0=失败 1=成功'"`
	AttnRatio            decimal.Decimal `gorm:"column:attn_ratio;default:0;type:decimal(36,18);comment:'出勤率'"`
	ImIvrRatio           decimal.Decimal `gorm:"column:im_ivr_ratio;default:0;type:decimal(36,18);comment:'im/ivr满意度'"`
	BaseModeTail
}

// MemberStar 星级
type MemberStar struct {
	BaseModeTitle
	Star         int             `gorm:"column:star;default:0;unique_index:uniq_star_grade;comment:'星级'"`
	Grade        int             `gorm:"column:grade;default:0;unique_index:uniq_star_grade;comment:'等级,单价的倍数按照等级走，不管星级'"`
	PlunderDelay int             `gorm:"column:plunder_delay;default:0;comment:'抢班延时'"`
	PriceRatio   decimal.Decimal `gorm:"column:price_ratio;type:decimal(36,18);default:0;comment:'单价的倍数'"`
	Status       int             `gorm:"column:status;default:0;"`
	ImgUrl       string          `gorm:"column:img_url;type:varchar(256);default:'';"`
	BaseModeTail
}

// Vacate 请假表
type Vacate struct {
	BaseModeTitle
	Erp            string `gorm:"column:erp;type:varchar(128);default:'';comment:'erp账号'"`
	TaskId         int64  `gorm:"column:task_id;default:0;comment:'要请假的任务id'"`
	TaskBizId      int64  `gorm:"column:task_biz_id;default:0;comment:'要请假的任务业务id'"`
	TaskDepStageId int64  `gorm:"column:task_dep_stage_id;default:0;comment:'要请假的时段id'"`
	JoinTaskId     int64  `gorm:"column:join_task_id;default:0;comment:'请假的报名表id'"`
	Description    string `gorm:"column:description;type:varchar(256);default:'';comment:'请假理由'"`
	AuthErp        string `gorm:"column:auth_erp;type:varchar(128);default:'';comment:'审核人erp账号'"`
	Status         int    `gorm:"column:status;default:0;comment:'0=未审核 1=已审核'"`
	BaseModeTail
}

// SysDepartment 系统部门表		京东导入的数据
type SysDepartment struct {
	BaseModeTitle
	DeptId    string `gorm:"column:dept_id;type:varchar(256);default:'';unique_index:uniq_dep_id;comment:'部门id'"`
	DeptName  string `gorm:"column:dept_name;type:varchar(64);default:'';comment:'部门名称'"`
	Pid       int64  `gorm:"column:pid;default:0;comment:'上级部门id,关联的是dept_id'"`
	Level     int    `gorm:"column:level;default:0;comment:'部门等级'"`
	Status    int    `gorm:"column:status;default:1;comment:'状态(0: 停用,1:启用)'"`
	ImpStatus int    `gorm:"column:imp_status;default:1;comment:'导入状态(0: 未导入,1:已导入)'"`
	LeaderErp string `gorm:"column:leader_erp;default:'';comment:'负责人erp'"`
	BaseModeTail
}

// BizLine 业务线表
type BizLine struct {
	BaseModeTitle
	Name          string          `gorm:"column:name;type:varchar(256);default:''"`
	BizType       int             `gorm:"column:biz_type;default:0;comment:'业务类型 1=在线 2=电话'"`
	Price         decimal.Decimal `gorm:"column:price;type:decimal(36,18);default:0;comment:'时薪'"`
	CPH           int             `gorm:"column:cph;default:0;comment:'每小时接待量'"`
	MainDepId     int64           `gorm:"column:main_dep_id;default:0;comment:'主承接部门'"`
	EffectiveTime time.Time       `gorm:"column:effective_time;comment:'生效时间'"`
	CheckPlan     int64           `gorm:"column:check_plan;default:0;comment:'绩效考核方案'"`
	Status        int             `gorm:"column:status;default:0;comment:'状态(0: 停用,1:启用)'"`
	BaseModeTail
}

// Task 任务表
type Task struct {
	BaseModeTitle
	Date            string `gorm:"column:date;default:'';comment:'日期';index:idx_date"`
	TimeStageId     int64  `gorm:"column:time_stage_id;default:0;comment:'时间段id'"`
	Title           string `gorm:"column:title;type:varchar(256);default:'';comment:'标题'"`
	Content         string `gorm:"column:content;type:varchar(256);default:'';comment:'内容'"`
	OnlineTargetNum int    `gorm:"column:online_target_num;default:0;comment:'在线目标量'"`
	TelTargetNum    int    `gorm:"column:tel_target_num;default:0;comment:'电话目标量'"`
	Type            int    `gorm:"column:type;default:0;comment:'业务类型 1=普通任务 2=临时任务'"`
	Status          int    `gorm:"column:status;default:1;comment:'0=创建中 1=未开放 2=进行中 3=已过期 4=删除'"`
	BaseModeTail
}

// TaskBiz 任务业务线表
type TaskBiz struct {
	BaseModeTitle
	TaskId    int64  `gorm:"column:task_id;default:0;index:idx_task_id"`
	Title     string `gorm:"column:title;type:varchar(256);default:'';comment:'标题'"`
	Content   string `gorm:"column:content;type:varchar(256);default:'';comment:'内容'"`
	BizType   int    `gorm:"column:biz_type;default:1;comment:'业务类型 1=在线 2=电话'"`
	BizLineId int64  `gorm:"column:biz_line_id;default:0;comment:'业务线id'"`
	TargetNum int    `gorm:"column:target_num;default:0;comment:'业务线目标值'"`
	CPH       int    `gorm:"column:cph;default:8;comment:'业务线CPH'"`
	MemberNum int    `gorm:"column:member_num;default:0;comment:'业务线人数'"`

	GradeLimit   int  `gorm:"column:grade_limit;default:0;comment:'等级限制'"`
	IsLimitStar1 bool `gorm:"column:is_limit_star1;default:0;comment:'是否是1星限制'"`
	IsLimitStar2 bool `gorm:"column:is_limit_star2;default:0;comment:'是否是2星限制'"`
	IsLimitStar3 bool `gorm:"column:is_limit_star3;default:0;comment:'是否是3星限制'"`
	Type         int  `gorm:"column:type;default:1;comment:'业务类型 1=普通任务 2=临时任务'"`

	Upgrade15 bool `gorm:"column:upgrade_15;default:0;comment:'是否1.5倍'"`
	Upgrade2  bool `gorm:"column:upgrade_2;default:0;comment:'是否2倍'"`
	Upgrade25 bool `gorm:"column:upgrade_25;default:0;comment:'是否2.5倍'"`

	EffectiveTime time.Time `gorm:"column:effective_time;comment:'生效时间，也就是放班时间'"`

	IsPre  bool `gorm:"column:is_pre;default:false;comment:'是否预备班'"`
	Status int  `gorm:"column:status;default:0;comment:'0=创建中 1=未开放 2=进行中 3=已过期 4=删除'"`
	BaseModeTail
}

// TaskDepStage 任务部门时段表
type TaskDepStage struct {
	BaseModeTitle
	TaskId            int64           `gorm:"column:task_id;default:0;index:idx_task_id;comment:'任务Id'"`
	TaskBizId         int64           `gorm:"column:task_biz_id;default:0;index:idx_task_biz_id;comment:'任务业务线Id'"`
	DepId             int64           `gorm:"column:dep_id;default:0;comment:'部门id'"`
	BizType           int             `gorm:"column:biz_type;default:1;comment:'业务类型 1=在线 2=电话'"`
	TimeStageId       int64           `gorm:"column:time_stage_id;default:1;comment:'时段方案 1=常规 2=大促 3=周末'"`
	TimeStageStart    time.Time       `gorm:"column:time_stage_start;comment:'时段开始时间'"`
	TimeStageStartStr string          `gorm:"column:time_stage_start_str;default:'';index:idx_time_stage_start_str;type:varchar(64);comment:'时段开始时间字符串，冗余，方便查询'"`
	TimeStageEnd      time.Time       `gorm:"column:time_stage_end;comment:'时段结束时间'"`
	TimeStageEndStr   string          `gorm:"column:time_stage_end_str;default:'';index:idx_time_stage_end_str;type:varchar(64);comment:'时段开始结束字符串，冗余，方便查询'"`
	StageRatio        decimal.Decimal `gorm:"column:stage_ratio;type:decimal(36,18);default:0;comment:'时段占比'"`
	QuotaAllocation   int             `gorm:"column:quota_allocation;default:1;comment:'放班名额'"`
	VirtualProgress   decimal.Decimal `gorm:"column:virtual_progress;type:decimal(36,18);default:0;comment:'外挂进度,显示虚拟报名进度'"`
	MemberNum         int             `gorm:"column:member_num;default:0;comment:'已报班人数'"`
	IsLimitStar1      bool            `gorm:"column:is_limit_star1;default:0;comment:'是否是1星限制'"`
	IsLimitStar2      bool            `gorm:"column:is_limit_star2;default:0;comment:'是否是2星限制'"`
	IsLimitStar3      bool            `gorm:"column:is_limit_star3;default:0;comment:'是否是3星限制'"`
	RankRatio         decimal.Decimal `gorm:"column:rank_ratio;type:decimal(36,18);default:0;comment:'指定排名,只有在部门排名在这个值之前的才可以抢班'"`
	NeedMemNum        int             `gorm:"column:need_mem_num;default:0;comment:'需求人数'"`
	Ratio             decimal.Decimal `gorm:"column:ratio;type:decimal(36,18);default:0;comment:'主部门与辅助部门各占比'"`

	TaskMul       decimal.Decimal `gorm:"column:task_mul;type:decimal(36,18);default:1;comment:'倍数'"`
	UpgradeVol    decimal.Decimal `gorm:"column:upgrade_vol;type:decimal(36,18);default:0;comment:'升级量'"`
	UpgradeDesc   string          `gorm:"column:upgrade_desc;type:varchar(256);default:'';comment:'升级原因'"`
	UpgradeStatus int             `gorm:"column:upgrade_status;default:0;comment:'升级状态 0=新升级，1=生效，2=失效'"`
	Attributes    string          `gorm:"column:attributes;type:varchar(256);default:'';comment:'属性'"`
	IsPre         bool            `gorm:"column:is_pre;default:false;comment:'是否预备班'"`
	MainStageId   int64           `gorm:"column:main_stage_id;default:0;comment:'主班id，只有is_pre为true才会有值'"`
	BaseModeTail
}

// JoinTask 报班表
type JoinTask struct {
	BaseModeTitle
	TaskId         int64     `gorm:"column:task_id;default:0;index:idx_task_id"`
	TaskBizId      int64     `gorm:"column:task_biz_id;default:0;index:idx_task_id;index:idx_task_biz_id"`
	TaskDepStageId int64     `gorm:"column:task_dep_stage_id;default:0;;unique_index:uniq_erp_stage_id;index:idx_task_dep_stage_id;comment:'任务部门时段id'"`
	Erp            string    `gorm:"column:erp;type:varchar(128);default:'';unique_index:uniq_erp_stage_id;comment:'erp账号'"`
	JoinTime       time.Time `gorm:"column:join_time;default:now();comment:'报名时间'"`
	Status         int       `gorm:"column:status;default:1;comment:'1=已报名 2=已请假 3=已结束'"`
	JoinSrc        int       `gorm:"column:join_src;default:1;comment:'加入途径 1=固定排班 2=自己报名'"`
	BaseModeTail
}

// TimeStage 时段方案
type TimeStage struct {
	BaseModeTitle
	Name      string `gorm:"column:name;type:varchar(128);default:'';comment:'名字'"`
	StartTime string `gorm:"column:start_time;type:varchar(128);default:'';comment:'开始时间，HH:mm:dd'"`
	EndTime   string `gorm:"column:end_time;type:varchar(128);default:'';comment:'结束时间，HH:mm:dd'"`
	BaseModeTail
}

// TimeStage详情 时段方案
type TimeStageDetail struct {
	BaseModeTitle
	TimeStageId int64           `gorm:"column:time_stage_id;default:0;comment:'时段方案id'"`
	StartTime   string          `gorm:"column:start_time;type:varchar(128);default:'';comment:'开始时间，HH:mm:dd'"`
	EndTime     string          `gorm:"column:end_time;type:varchar(128);default:'';comment:'结束时间，HH:mm:dd'"`
	Ratio       decimal.Decimal `gorm:"column:ratio;type:decimal(36,18);default:0;comment:'占比'"`
	BaseModeTail
}

// DepRatio 部门管理者占比
type DepRatio struct {
	BaseModeTitle
	DepId         int64           `gorm:"column:dep_id;default:0;comment:'部门id';unique_index:uniq_dep_id_biz_type"`
	BizType       int             `gorm:"column:biz_type;default:1;comment:'业务类型 1=在线 2=电话';unique_index:uniq_dep_id_biz_type"`
	DepName       string          `gorm:"column:dep_name;type:varchar(128);default:'';comment:'部门名称'"`
	Count         int             `gorm:"column:count;default:0;comment:'管理者人数'"`
	Ratio         decimal.Decimal `gorm:"column:ratio;type:decimal(36,18);default:0;comment:'占比'"`
	EffectiveTime time.Time       `gorm:"column:effective_time;comment:'生效时间'"`
	BaseModeTail
}

// GradeSetting 等级配置
type GradeSetting struct {
	BaseModeTitle
	Star         int             `gorm:"column:star;default:0;unique_index:uniq_star_grade;comment:'星级'"`
	Grade        int             `gorm:"column:grade;default:0;comment:'等级'"`
	GradeName    string          `gorm:"column:grade_name;default:'';comment:'等级外挂名称'"`
	OnlineTime   int             `gorm:"column:online_time;default:0;comment:'累计在线时长（小时）'"`
	ReceptionNum int             `gorm:"column:reception_num;default:0;comment:'接待量'"`
	Satisfaction decimal.Decimal `gorm:"column:satisfaction;type:decimal(36,18);default:0;comment:'满意度'"`
	FirstSettle  decimal.Decimal `gorm:"column:first_settle;default:0;type:decimal(36,18);comment:'首解率'"`
	IMIVR        decimal.Decimal `gorm:"column:imivr;default:0;type:decimal(36,18);comment:'IM/IVR满意度'"`
	BaseModeTail
}

// StarSetting 星级配置
type StarSetting struct {
	BaseModeTitle
	Star       int    `gorm:"column:star;default:0;unique_index:uniq_star;comment:'星级'"`
	HeadIco    string `gorm:"column:head_ico;default:'';type:varchar(256);comment:'头像框'"`
	CourseName string `gorm:"column:course_name;default:'';type:varchar(256);comment:'课程名称'"`
	BaseModeTail
}

// NoticeType 消息方案中的消息外挂名称
type NoticeType struct {
	BaseModeTitle
	Content string `gorm:"column:content;type:varchar(256);default:'';comment:'名称'"`
	BaseModeTail
}

type MemberStarAnalyse struct {
	BaseModeTitle
	Erp      string          `gorm:"column:erp;default:'';comment:'';unique_index:uniq_erp_dep_id"`
	DepId    int64           `gorm:"column:dep_id;default:0;comment:'';unique_index:uniq_erp_dep_id"`
	Star1Num int             `gorm:"column:star1_num;default:0;comment:'部门中1星总人数'"`
	Star2Num int             `gorm:"column:star2_num;default:0;comment:'部门中2星总人数'"`
	Star3Num int             `gorm:"column:star3_num;default:0;comment:'部门中3星总人数'"`
	Star123  decimal.Decimal `gorm:"column:star123;default:0;type:decimal(36,18);comment:''"`
	Star1    decimal.Decimal `gorm:"column:star1;default:0;type:decimal(36,18);comment:''"`
	Star2    decimal.Decimal `gorm:"column:star2;default:0;type:decimal(36,18);comment:''"`
	Star3    decimal.Decimal `gorm:"column:star3;default:0;type:decimal(36,18);comment:''"`
	Star12   decimal.Decimal `gorm:"column:star12;default:0;type:decimal(36,18);comment:''"`
	Star13   decimal.Decimal `gorm:"column:star13;default:0;type:decimal(36,18);comment:''"`
	Star23   decimal.Decimal `gorm:"column:star23;default:0;type:decimal(36,18);comment:''"`
	BaseModeTail
}

type MemberStarInfluence struct {
	BaseModeTitle
	Erp              string          `gorm:"column:erp;default:'';comment:'';unique_index:uniq_erp_dep_id"`
	DepId            int64           `gorm:"column:dep_id;default:0;comment:'';unique_index:uniq_erp_dep_id"`
	Star1Num         int             `gorm:"column:star1_num;default:0;comment:'部门中1星总人数'"`
	Star2Num         int             `gorm:"column:star2_num;default:0;comment:'部门中2星总人数'"`
	Star3Num         int             `gorm:"column:star3_num;default:0;comment:'部门中3星总人数'"`
	Star123Influence decimal.Decimal `gorm:"column:star123;default:0;type:decimal(36,18);comment:''"`
	Star1Influence   decimal.Decimal `gorm:"column:star1_influence;default:0;type:decimal(36,18);comment:''"`
	Star2Influence   decimal.Decimal `gorm:"column:star2_influence;default:0;type:decimal(36,18);comment:''"`
	Star3Influence   decimal.Decimal `gorm:"column:star3_influence;default:0;type:decimal(36,18);comment:''"`
	Star12Influence  decimal.Decimal `gorm:"column:star12_influence;default:0;type:decimal(36,18);comment:''"`
	Star13Influence  decimal.Decimal `gorm:"column:star13_influence;default:0;type:decimal(36,18);comment:''"`
	Star23Influence  decimal.Decimal `gorm:"column:star23_;default:0;type:decimal(36,18);comment:''"`
	BaseModeTail
}
